Imports BUS
Imports DTO

Public Class DoiMatKhau

    Private Sub btnLuu_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLuu.Click
        Dim userbus As New UserBUS
        Dim kq As Boolean
        Dim mkmoi, mklaplai As String
        mkmoi = Me.txtMatKhauMoi.Text
        mklaplai = Me.txtNhapLai.Text
        kq = userbus.KiemTraMK(mkmoi, mklaplai)
        Dim s As String = FormDangNhap.DangNhap1.tenuser
        If (kq = False) Then
            MsgBox("Xac nhan lai mat khau moi", MsgBoxStyle.Exclamation, "warning")
        Else
            userbus.DoiMatKhau(FormDangNhap.DangNhap1.tenuser, Me.txtMatKhau.Text, Me.txtMatKhauMoi.Text)

        End If
        Me.txtMatKhau.Text = ""
        Me.txtMatKhauMoi.Text = ""
        Me.txtNhapLai.Text = ""
    End Sub

End Class
